// src/router/index.jsx
import { createBrowserRouter } from "react-router-dom";
import Layout from '@/pages/layout'
import Login from "@/pages/Login"
import AuthRoute from '@/components/AuthRoute'
import WorkBeach from "@/pages/WorkBeach";
const router = createBrowserRouter([
  {
    path: "/",
    element: <AuthRoute><Layout /></AuthRoute>,
    children: [
      {
        path: "/",
        element: <div>首页</div>
      },
      {
        path: "workbeach",
        element: <WorkBeach />
      },
      {
        path: "user",
        element: <div>用户管理</div>
      },
      {
        path: "personal",
        element: <div>个人中心</div>
      }
    ]
  },
  {
    path: "/login",
    element: <Login />,
  },
])
export default router